/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * SES100.java
 *
 * Created on 2011-7-5, 13:21:55
 */
package seso;

import org.jdesktop.application.Action;
import javax.swing.*;
import java.awt.*;

/**
 *
 * @author Administrator
 */
public class SES100H extends MaintDialog {

    String transactionNo = "";
    //etcohQuery.setParameter("transactionNo", transactionNo);

    public SES100H(javax.swing.JFrame parent, boolean modal) {
        super(parent, modal);
        moreConstructon();
    }

    public SES100H(javax.swing.JFrame parent, boolean modal, String transactionNo, int dlgDataMode) {
        super(parent, modal);
        this.transactionNo = transactionNo;
        this.dlgDataMode = dlgDataMode;

        moreConstructon();
    }

    public void moreConstructon() {
        initComponents();

        masterScrollPane.setVisible(false);
        masterTable.setVisible(false);
        masterTable.setRowSelectionInterval(0, 0);        
        
        isBrowseDialog = false;
        refreshToolsBar();

        setProgTitle("SES100/H*", "Upload CO - Quantity By Location & Country");
        this.IncreaseIndexMiniProgID = false;
    }

    @Override
    public void paint(Graphics g) {
        super.paint(g);
        paintDialogComponent();
    }

    @Override
    public void paintTemplateComponent() {
        super.paintTemplateComponent(rDialogDataAeraPanel, rDialogShortcutSeparator, rDialogShortcutExpandSwitch, rDialogShortcutPanel, rDiglogShortcutSettingButton, bottomNavigatorPanel, rNavigatorCloseButton, rNavigatorPrevButton, rNavigatorNextButton, dialogTabbedPanel);
    }

    @Override
    public void paintDialogComponent() {
        int bottomMargin = 70; // bottom margin

        headerDataPanel.setSize(rDialogDataAeraPanel.getWidth() - headerDataPanel.getX(), headerDataPanel.getHeight());
        detailDataPanel.setSize(rDialogDataAeraPanel.getWidth() - headerDataPanel.getX(), rDialogDataAeraPanel.getHeight() - detailDataPanel.getY() - bottomMargin);
        
        detailScrollPane.setSize((int)(detailDataPanel.getWidth() - detailScrollPane.getX() * 1.8), detailDataPanel.getHeight() - detailScrollPane.getY());
        detailTable.setSize(detailScrollPane.getWidth(), detailScrollPane.getHeight());
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        bindingGroup = new org.jdesktop.beansbinding.BindingGroup();

        entityManager = java.beans.Beans.isDesignTime() ? null : javax.persistence.Persistence.createEntityManagerFactory("M3G;databaseName=M3ERPPU").createEntityManager();
        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(seso.SesoApp.class).getContext().getResourceMap(SES100H.class);
        etcohQuery = java.beans.Beans.isDesignTime() ? null : entityManager.createQuery(resourceMap.getString("etcohQuery.query")); // NOI18N
        etcohList = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : org.jdesktop.observablecollections.ObservableCollections.observableList(etcohQuery.getResultList());
        etFileCtyQtyQuery = java.beans.Beans.isDesignTime() ? null : entityManager.createQuery("SELECT e FROM EtFileCtyQty e");
        etFileCtyQtyList = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : org.jdesktop.observablecollections.ObservableCollections.observableList(etFileCtyQtyQuery.getResultList());
        rDialogDataAeraPanel = new seso.RDialogDataAeraPanel();
        bottomNavigatorPanel = new seso.RPanel();
        rNavigatorNextButton = new seso.RNavigatorNextButton();
        rNavigatorPrevButton = new seso.RNavigatorPrevButton();
        rNavigatorCloseButton = new seso.RNavigatorCloseButton();
        dialogTabbedPanel = new seso.RPanel();
        rDialogTabbedButton1 = new seso.RDialogTabbedButton();
        rDialogTabbedButton2 = new seso.RDialogTabbedButton();
        rDialogTabbedButton3 = new seso.RDialogTabbedButton();
        rDialogTabbedButton4 = new seso.RDialogTabbedButton();
        rDialogTabbedButton5 = new seso.RDialogTabbedButton();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        headerDataPanel = new seso.RDataPanel();
        rLabel7 = new seso.RLabel();
        fldTransactionNo = new seso.RTextField();
        rLabel1 = new seso.RLabel();
        fldStatus = new seso.RTextField();
        rLabel2 = new seso.RLabel();
        rTextField3 = new seso.RTextField();
        rLabel3 = new seso.RLabel();
        rTextField4 = new seso.RTextField();
        rLabel4 = new seso.RLabel();
        rTextField5 = new seso.RTextField();
        rLabel5 = new seso.RLabel();
        rTextField6 = new seso.RTextField();
        masterScrollPane = new javax.swing.JScrollPane();
        masterTable = new javax.swing.JTable();
        detailDataPanel = new seso.RDataPanel();
        detailScrollPane = new seso.RTableScrollPane();
        detailTable = new seso.RTable();
        rDialogShortcutSeparator = new seso.RDialogShortcutSeparator();
        rDialogShortcutPanel = new seso.RDialogShortcutPanel();
        rDiglogShortcutSettingButton = new seso.RDiglogShortcutSettingButton();
        rDialogShortcutExpandSwitch = new seso.RDialogShortcutExpandSwitch();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setName("Form"); // NOI18N
        getContentPane().setLayout(null);

        rDialogDataAeraPanel.setName("rDialogDataAeraPanel"); // NOI18N
        rDialogDataAeraPanel.setLayout(null);

        bottomNavigatorPanel.setName("bottomNavigatorPanel"); // NOI18N

        javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(seso.SesoApp.class).getContext().getActionMap(SES100H.class, this);
        rNavigatorNextButton.setAction(actionMap.get("rNavigatorNextAction")); // NOI18N
        rNavigatorNextButton.setName("rNavigatorNextButton"); // NOI18N
        bottomNavigatorPanel.add(rNavigatorNextButton);
        rNavigatorNextButton.setBounds(587, 0, 88, 28);

        rNavigatorPrevButton.setAction(actionMap.get("rNavigatorPrevAction")); // NOI18N
        rNavigatorPrevButton.setName("rNavigatorPrevButton"); // NOI18N
        bottomNavigatorPanel.add(rNavigatorPrevButton);
        rNavigatorPrevButton.setBounds(530, 0, 54, 28);

        rNavigatorCloseButton.setAction(actionMap.get("rNavigatorCloseAction")); // NOI18N
        rNavigatorCloseButton.setName("rNavigatorCloseButton"); // NOI18N
        bottomNavigatorPanel.add(rNavigatorCloseButton);
        rNavigatorCloseButton.setBounds(0, 0, 88, 28);

        rDialogDataAeraPanel.add(bottomNavigatorPanel);
        bottomNavigatorPanel.setBounds(10, 400, 670, 28);

        dialogTabbedPanel.setName("dialogTabbedPanel"); // NOI18N

        rDialogTabbedButton1.setAction(actionMap.get("rDialogTabbedButton1Action")); // NOI18N
        rDialogTabbedButton1.setCurrentPanel(false);
        rDialogTabbedButton1.setName("rDialogTabbedButton1"); // NOI18N
        rDialogTabbedButton1.setText0(resourceMap.getString("rDialogTabbedButton1.text0")); // NOI18N
        rDialogTabbedButton1.setText1(resourceMap.getString("rDialogTabbedButton1.text1")); // NOI18N
        rDialogTabbedButton1.setText2(resourceMap.getString("rDialogTabbedButton1.text2")); // NOI18N
        rDialogTabbedButton1.setText3(resourceMap.getString("rDialogTabbedButton1.text3")); // NOI18N
        dialogTabbedPanel.add(rDialogTabbedButton1);
        rDialogTabbedButton1.setBounds(0, 0, 100, 39);

        rDialogTabbedButton2.setAction(actionMap.get("rDialogTabbedButton2Action")); // NOI18N
        rDialogTabbedButton2.setCurrentPanel(false);
        rDialogTabbedButton2.setName("rDialogTabbedButton2"); // NOI18N
        rDialogTabbedButton2.setText0(resourceMap.getString("rDialogTabbedButton2.text0")); // NOI18N
        rDialogTabbedButton2.setText1(resourceMap.getString("rDialogTabbedButton2.text1")); // NOI18N
        rDialogTabbedButton2.setText2(resourceMap.getString("rDialogTabbedButton2.text2")); // NOI18N
        rDialogTabbedButton2.setText3(resourceMap.getString("rDialogTabbedButton2.text3")); // NOI18N
        dialogTabbedPanel.add(rDialogTabbedButton2);
        rDialogTabbedButton2.setBounds(110, 0, 100, 39);

        rDialogTabbedButton3.setAction(actionMap.get("rDialogTabbedButton3Action")); // NOI18N
        rDialogTabbedButton3.setCurrentPanel(false);
        rDialogTabbedButton3.setName("rDialogTabbedButton3"); // NOI18N
        rDialogTabbedButton3.setText0(resourceMap.getString("rDialogTabbedButton3.text0")); // NOI18N
        rDialogTabbedButton3.setText1(resourceMap.getString("rDialogTabbedButton3.text1")); // NOI18N
        rDialogTabbedButton3.setText2(resourceMap.getString("rDialogTabbedButton3.text2")); // NOI18N
        rDialogTabbedButton3.setText3(resourceMap.getString("rDialogTabbedButton3.text3")); // NOI18N
        dialogTabbedPanel.add(rDialogTabbedButton3);
        rDialogTabbedButton3.setBounds(220, 0, 100, 39);

        rDialogTabbedButton4.setAction(actionMap.get("rDialogTabbedButton4Action")); // NOI18N
        rDialogTabbedButton4.setCurrentPanel(false);
        rDialogTabbedButton4.setName("rDialogTabbedButton4"); // NOI18N
        rDialogTabbedButton4.setText0(resourceMap.getString("rDialogTabbedButton4.text0")); // NOI18N
        rDialogTabbedButton4.setText1(resourceMap.getString("rDialogTabbedButton4.text1")); // NOI18N
        rDialogTabbedButton4.setText2(resourceMap.getString("rDialogTabbedButton4.text2")); // NOI18N
        dialogTabbedPanel.add(rDialogTabbedButton4);
        rDialogTabbedButton4.setBounds(330, 0, 100, 39);

        rDialogTabbedButton5.setName("rDialogTabbedButton5"); // NOI18N
        rDialogTabbedButton5.setText0(resourceMap.getString("rDialogTabbedButton5.text0")); // NOI18N
        rDialogTabbedButton5.setText1(resourceMap.getString("rDialogTabbedButton5.text1")); // NOI18N
        rDialogTabbedButton5.setText2(resourceMap.getString("rDialogTabbedButton5.text2")); // NOI18N
        dialogTabbedPanel.add(rDialogTabbedButton5);
        rDialogTabbedButton5.setBounds(440, 0, 120, 39);

        rDialogDataAeraPanel.add(dialogTabbedPanel);
        dialogTabbedPanel.setBounds(20, 360, 660, 36);

        jLabel1.setFont(resourceMap.getFont("jLabel1.font")); // NOI18N
        jLabel1.setForeground(resourceMap.getColor("jLabel1.foreground")); // NOI18N
        jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
        jLabel1.setName("jLabel1"); // NOI18N
        jLabel1.setRequestFocusEnabled(false);
        rDialogDataAeraPanel.add(jLabel1);
        jLabel1.setBounds(15, 10, 120, 18);

        jLabel2.setFont(resourceMap.getFont("jLabel2.font")); // NOI18N
        jLabel2.setForeground(resourceMap.getColor("jLabel2.foreground")); // NOI18N
        jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
        jLabel2.setName("jLabel2"); // NOI18N
        rDialogDataAeraPanel.add(jLabel2);
        jLabel2.setBounds(15, 140, 160, 18);

        headerDataPanel.setName("headerDataPanel"); // NOI18N

        rLabel7.setText(resourceMap.getString("rLabel7.text")); // NOI18N
        rLabel7.setName("rLabel7"); // NOI18N
        headerDataPanel.add(rLabel7);
        rLabel7.setBounds(10, 10, 90, 20);

        fldTransactionNo.setEditable(false);
        fldTransactionNo.setCustomizeEditable(false);
        fldTransactionNo.setName("fldTransactionNo"); // NOI18N

        org.jdesktop.beansbinding.Binding binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, masterTable, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.transactionNo}"), fldTransactionNo, org.jdesktop.beansbinding.BeanProperty.create("text"));
        bindingGroup.addBinding(binding);

        headerDataPanel.add(fldTransactionNo);
        fldTransactionNo.setBounds(140, 10, 150, 24);

        rLabel1.setText(resourceMap.getString("rLabel1.text")); // NOI18N
        rLabel1.setName("rLabel1"); // NOI18N
        headerDataPanel.add(rLabel1);
        rLabel1.setBounds(400, 10, 50, 20);

        fldStatus.setCustomizeEditable(false);
        fldStatus.setName("fldStatus"); // NOI18N

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, masterTable, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.status}"), fldStatus, org.jdesktop.beansbinding.BeanProperty.create("text"));
        bindingGroup.addBinding(binding);

        headerDataPanel.add(fldStatus);
        fldStatus.setBounds(500, 10, 160, 24);

        rLabel2.setText(resourceMap.getString("rLabel2.text")); // NOI18N
        rLabel2.setName("rLabel2"); // NOI18N
        headerDataPanel.add(rLabel2);
        rLabel2.setBounds(10, 35, 90, 20);

        rTextField3.setEditable(false);
        rTextField3.setName("rTextField3"); // NOI18N

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, masterTable, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.season}"), rTextField3, org.jdesktop.beansbinding.BeanProperty.create("text"));
        bindingGroup.addBinding(binding);

        headerDataPanel.add(rTextField3);
        rTextField3.setBounds(140, 35, 100, 24);

        rLabel3.setText(resourceMap.getString("rLabel3.text")); // NOI18N
        rLabel3.setName("rLabel3"); // NOI18N
        headerDataPanel.add(rLabel3);
        rLabel3.setBounds(400, 35, 90, 20);

        rTextField4.setName("rTextField4"); // NOI18N

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, masterTable, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.weeklyOrFinal}"), rTextField4, org.jdesktop.beansbinding.BeanProperty.create("text"));
        bindingGroup.addBinding(binding);

        headerDataPanel.add(rTextField4);
        rTextField4.setBounds(500, 35, 100, 24);

        rLabel4.setText(resourceMap.getString("rLabel4.text")); // NOI18N
        rLabel4.setName("rLabel4"); // NOI18N
        headerDataPanel.add(rLabel4);
        rLabel4.setBounds(10, 60, 90, 20);

        rTextField5.setName("rTextField5"); // NOI18N

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, masterTable, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.createBy}"), rTextField5, org.jdesktop.beansbinding.BeanProperty.create("text"));
        bindingGroup.addBinding(binding);

        headerDataPanel.add(rTextField5);
        rTextField5.setBounds(140, 60, 150, 24);

        rLabel5.setText(resourceMap.getString("rLabel5.text")); // NOI18N
        rLabel5.setName("rLabel5"); // NOI18N
        headerDataPanel.add(rLabel5);
        rLabel5.setBounds(400, 60, 80, 20);

        rTextField6.setName("rTextField6"); // NOI18N

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, masterTable, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.description}"), rTextField6, org.jdesktop.beansbinding.BeanProperty.create("text"));
        bindingGroup.addBinding(binding);

        headerDataPanel.add(rTextField6);
        rTextField6.setBounds(500, 60, 180, 24);

        masterScrollPane.setName("masterScrollPane"); // NOI18N

        masterTable.setFont(resourceMap.getFont("masterTable.font")); // NOI18N
        masterTable.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
        masterTable.setName("masterTable"); // NOI18N

        org.jdesktop.swingbinding.JTableBinding jTableBinding = org.jdesktop.swingbinding.SwingBindings.createJTableBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, etcohList, masterTable);
        org.jdesktop.swingbinding.JTableBinding.ColumnBinding columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${transactionNo}"));
        columnBinding.setColumnName("Transaction No");
        columnBinding.setColumnClass(String.class);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${createBy}"));
        columnBinding.setColumnName("Create By");
        columnBinding.setColumnClass(String.class);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${createDate}"));
        columnBinding.setColumnName("Create Date");
        columnBinding.setColumnClass(String.class);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${description}"));
        columnBinding.setColumnName("Description");
        columnBinding.setColumnClass(String.class);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${filePath}"));
        columnBinding.setColumnName("File Path");
        columnBinding.setColumnClass(String.class);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${status}"));
        columnBinding.setColumnName("Status");
        columnBinding.setColumnClass(String.class);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${weeklyOrFinal}"));
        columnBinding.setColumnName("Weekly Or Final");
        columnBinding.setColumnClass(String.class);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${season}"));
        columnBinding.setColumnName("Season");
        columnBinding.setColumnClass(String.class);
        bindingGroup.addBinding(jTableBinding);
        jTableBinding.bind();
        masterScrollPane.setViewportView(masterTable);
        masterTable.getColumnModel().getColumn(0).setHeaderValue(resourceMap.getString("masterTable.columnModel.title0")); // NOI18N
        masterTable.getColumnModel().getColumn(1).setHeaderValue(resourceMap.getString("masterTable.columnModel.title1")); // NOI18N
        masterTable.getColumnModel().getColumn(2).setHeaderValue(resourceMap.getString("masterTable.columnModel.title2")); // NOI18N
        masterTable.getColumnModel().getColumn(3).setHeaderValue(resourceMap.getString("masterTable.columnModel.title3")); // NOI18N
        masterTable.getColumnModel().getColumn(4).setHeaderValue(resourceMap.getString("masterTable.columnModel.title4")); // NOI18N
        masterTable.getColumnModel().getColumn(5).setHeaderValue(resourceMap.getString("masterTable.columnModel.title5")); // NOI18N
        masterTable.getColumnModel().getColumn(6).setHeaderValue(resourceMap.getString("masterTable.columnModel.title6")); // NOI18N
        masterTable.getColumnModel().getColumn(7).setHeaderValue(resourceMap.getString("masterTable.columnModel.title7")); // NOI18N

        headerDataPanel.add(masterScrollPane);
        masterScrollPane.setBounds(180, 20, 200, 40);

        rDialogDataAeraPanel.add(headerDataPanel);
        headerDataPanel.setBounds(5, 30, 680, 90);

        detailDataPanel.setName("detailDataPanel"); // NOI18N

        detailScrollPane.setName("detailScrollPane"); // NOI18N

        detailTable.setAutoCreateRowSorter(true);
        detailTable.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
        detailTable.setName("detailTable"); // NOI18N

        jTableBinding = org.jdesktop.swingbinding.SwingBindings.createJTableBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, etFileCtyQtyList, detailTable);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${transactionNo}"));
        columnBinding.setColumnName("Transaction No");
        columnBinding.setColumnClass(String.class);
        columnBinding.setEditable(false);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${customerDigitalCode}"));
        columnBinding.setColumnName("Customer Digital Code");
        columnBinding.setColumnClass(String.class);
        columnBinding.setEditable(false);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${customer}"));
        columnBinding.setColumnName("Customer");
        columnBinding.setColumnClass(String.class);
        columnBinding.setEditable(false);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${rvSubCustomerCode}"));
        columnBinding.setColumnName("Rv Sub Customer Code");
        columnBinding.setColumnClass(String.class);
        columnBinding.setEditable(false);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${orderType}"));
        columnBinding.setColumnName("Order Type");
        columnBinding.setColumnClass(Character.class);
        columnBinding.setEditable(false);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${quantity}"));
        columnBinding.setColumnName("Quantity");
        columnBinding.setColumnClass(Integer.class);
        columnBinding.setEditable(false);
        bindingGroup.addBinding(jTableBinding);
        jTableBinding.bind();
        detailScrollPane.setViewportView(detailTable);
        detailTable.getColumnModel().getColumn(0).setPreferredWidth(110);
        detailTable.getColumnModel().getColumn(0).setHeaderValue(resourceMap.getString("detailTable.columnModel.title0")); // NOI18N
        detailTable.getColumnModel().getColumn(1).setPreferredWidth(80);
        detailTable.getColumnModel().getColumn(1).setHeaderValue(resourceMap.getString("detailTable.columnModel.title1")); // NOI18N
        detailTable.getColumnModel().getColumn(2).setPreferredWidth(80);
        detailTable.getColumnModel().getColumn(2).setHeaderValue(resourceMap.getString("detailTable.columnModel.title2")); // NOI18N
        detailTable.getColumnModel().getColumn(3).setPreferredWidth(80);
        detailTable.getColumnModel().getColumn(3).setHeaderValue(resourceMap.getString("detailTable.columnModel.title3")); // NOI18N
        detailTable.getColumnModel().getColumn(4).setPreferredWidth(80);
        detailTable.getColumnModel().getColumn(4).setHeaderValue(resourceMap.getString("detailTable.columnModel.title4")); // NOI18N
        detailTable.getColumnModel().getColumn(5).setPreferredWidth(100);
        detailTable.getColumnModel().getColumn(5).setHeaderValue(resourceMap.getString("detailTable.columnModel.title5")); // NOI18N

        detailDataPanel.add(detailScrollPane);
        detailScrollPane.setBounds(10, 20, 660, 90);

        rDialogDataAeraPanel.add(detailDataPanel);
        detailDataPanel.setBounds(5, 160, 680, 160);

        getContentPane().add(rDialogDataAeraPanel);
        rDialogDataAeraPanel.setBounds(0, 71, 710, 440);

        rDialogShortcutSeparator.setName("rDialogShortcutSeparator"); // NOI18N
        rDialogShortcutSeparator.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
            public void mouseDragged(java.awt.event.MouseEvent evt) {
                rDialogShortcutSeparatorMouseDragged(evt);
            }
        });
        getContentPane().add(rDialogShortcutSeparator);
        rDialogShortcutSeparator.setBounds(730, 71, 8, 200);

        rDialogShortcutPanel.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        rDialogShortcutPanel.setName("rDialogShortcutPanel"); // NOI18N
        rDialogShortcutPanel.setLayout(null);

        rDiglogShortcutSettingButton.setName("rDiglogShortcutSettingButton"); // NOI18N
        rDialogShortcutPanel.add(rDiglogShortcutSettingButton);
        rDiglogShortcutSettingButton.setBounds(140, 10, 20, 20);

        rDialogShortcutExpandSwitch.setName("rDialogShortcutExpandSwitch"); // NOI18N
        rDialogShortcutExpandSwitch.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                rDialogShortcutExpandSwitchMouseClicked(evt);
            }
        });
        rDialogShortcutPanel.add(rDialogShortcutExpandSwitch);
        rDialogShortcutExpandSwitch.setBounds(160, 60, 8, 145);

        getContentPane().add(rDialogShortcutPanel);
        rDialogShortcutPanel.setBounds(760, 71, 170, 290);

        bindingGroup.bind();

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void rDialogShortcutExpandSwitchMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_rDialogShortcutExpandSwitchMouseClicked
        dialogShortcutExpandSwitchMouseClicked(evt, rDialogShortcutExpandSwitch, rDialogShortcutSeparator);
    }//GEN-LAST:event_rDialogShortcutExpandSwitchMouseClicked

    private void rDialogShortcutSeparatorMouseDragged(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_rDialogShortcutSeparatorMouseDragged
        dialogShortcutSeparatorMouseDragged(evt, rDialogShortcutExpandSwitch);
    }//GEN-LAST:event_rDialogShortcutSeparatorMouseDragged

    @Action
    public void rNavigatorCloseAction() {
        this.cmdCloseAction();
    }

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                SES100H dialog = new SES100H(new javax.swing.JFrame(), true);
                dialog.addWindowListener(new java.awt.event.WindowAdapter() {

                    public void windowClosing(java.awt.event.WindowEvent e) {
                        System.exit(0);
                    }
                });
                dialog.setVisible(true);
            }
        });
    }

    @Override
    public void cmdRefreshAction() {
        super.cmdRefreshAction();
        java.util.Collection data = etcohQuery.getResultList();
        for (Object entity : data) {
            entityManager.refresh(entity);
        }
        etcohList.clear();
        etcohList.addAll(data);

        masterTable.setRowSelectionInterval(0, 0);
    }    
    
    @Action
    public void rNavigatorPrevAction() {
        rDialogTabbedButton4Action();
    }

    @Action
    public void rNavigatorNextAction() {
    }

    @Action
    public void rDialogTabbedButton1Action() {
        SES100B dlg = new SES100B(parent, false);
        dlg.IncreaseIndexMiniProgID = false;
        dlg.setMiniProgListJPanel(miniProgListJPanel, indexMiniProgID);
        dispose();
        SesoApp.getApplication().show(dlg); 
    }    
    
    @Action
    public void rDialogTabbedButton2Action() {
        SES100E dlg = new SES100E(parent, false, transactionNo, AppSetting.DISPLAY_MODE);
        dlg.setMiniProgListJPanel(miniProgListJPanel, indexMiniProgID);
        dispose();
        SesoApp.getApplication().show(dlg);    
    }

    @Action
    public void rDialogTabbedButton3Action() {
        SES100F dlg = new SES100F(parent, false, transactionNo, AppSetting.DISPLAY_MODE);
        dlg.setMiniProgListJPanel(miniProgListJPanel, indexMiniProgID);
        dispose();
        SesoApp.getApplication().show(dlg);
    }

    @Action
    public void rDialogTabbedButton4Action() {
        SES100G dlg = new SES100G(parent, false, transactionNo, AppSetting.DISPLAY_MODE);
        dlg.setMiniProgListJPanel(miniProgListJPanel, indexMiniProgID);
        dispose();
        SesoApp.getApplication().show(dlg);
    }



    

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private seso.RPanel bottomNavigatorPanel;
    private seso.RDataPanel detailDataPanel;
    private seso.RTableScrollPane detailScrollPane;
    private seso.RTable detailTable;
    private seso.RPanel dialogTabbedPanel;
    private javax.persistence.EntityManager entityManager;
    private java.util.List<seso.EtFileCtyQty> etFileCtyQtyList;
    private javax.persistence.Query etFileCtyQtyQuery;
    private java.util.List<seso.Etcoh> etcohList;
    private javax.persistence.Query etcohQuery;
    private seso.RTextField fldStatus;
    private seso.RTextField fldTransactionNo;
    private seso.RDataPanel headerDataPanel;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JScrollPane masterScrollPane;
    private javax.swing.JTable masterTable;
    private seso.RDialogDataAeraPanel rDialogDataAeraPanel;
    private seso.RDialogShortcutExpandSwitch rDialogShortcutExpandSwitch;
    private seso.RDialogShortcutPanel rDialogShortcutPanel;
    private seso.RDialogShortcutSeparator rDialogShortcutSeparator;
    private seso.RDialogTabbedButton rDialogTabbedButton1;
    private seso.RDialogTabbedButton rDialogTabbedButton2;
    private seso.RDialogTabbedButton rDialogTabbedButton3;
    private seso.RDialogTabbedButton rDialogTabbedButton4;
    private seso.RDialogTabbedButton rDialogTabbedButton5;
    private seso.RDiglogShortcutSettingButton rDiglogShortcutSettingButton;
    private seso.RLabel rLabel1;
    private seso.RLabel rLabel2;
    private seso.RLabel rLabel3;
    private seso.RLabel rLabel4;
    private seso.RLabel rLabel5;
    private seso.RLabel rLabel7;
    private seso.RNavigatorCloseButton rNavigatorCloseButton;
    private seso.RNavigatorNextButton rNavigatorNextButton;
    private seso.RNavigatorPrevButton rNavigatorPrevButton;
    private seso.RTextField rTextField3;
    private seso.RTextField rTextField4;
    private seso.RTextField rTextField5;
    private seso.RTextField rTextField6;
    private org.jdesktop.beansbinding.BindingGroup bindingGroup;
    // End of variables declaration//GEN-END:variables
}
